package Month11.Day12;


import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Test03 {
    public static void main(String[] args) {
        /*
             输入一个文件名，输出其中的byte内容。
         */
        FileInputStream f = null;
        try {
            f = new FileInputStream("D:\\中国玩家\\合肥玩家\\zcj.txt");
            byte[] b = new byte[f.available()];
            int lenth = 0;
            lenth = f.read(b);
            System.out.println(new String(b, 0, lenth));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                f.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }


    }
}
